#pragma once

#include "FrameOperation.h"

//init value type, do not need constructor
//only exist when new a value type without a constructor
//for example 
//  MyStruct a= new MyStruct(); //if MyStruct do not have MyStruct(),use init value type operation
class CInitValueTypeOperation : public IFrameOperation
{
public:
    /// @brief 
    /// @param InClassDescription 
    /// @param InConstructorFunction if is null, use default constructor
    CInitValueTypeOperation(
        std::shared_ptr<CTypeDescription> InClassDescription  
        )
    {
        assert(InClassDescription->IsValueType() && "CInitValueTypeOperation only support Value type");
        ClassDescription=InClassDescription;
    }

    virtual EFrameOperationType GetType() const override
    {
        return EFrameOperationType::InitValueType;
    }

    std::shared_ptr<CTypeDescription> GetClassDescription() const
    {
        return ClassDescription;
    }

protected:
    std::shared_ptr<CTypeDescription> ClassDescription;

};
